package com.spring.soundsystem.test;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Order(1)
@Aspect
@Component
public class aop {
    public aop(){}
    @Pointcut("execution(* com.spring.soundsystem.test.*(..))")
    public void invoke() throws Throwable {
        System.out.println("执行切片");
    }
    @Before(value = "invoke()")
    public void be(){
        System.out.println("before");
    }
}
